package com.example.demo.service;

import com.example.demo.pojo.Cart;
import com.example.demo.pojo.Dto.CartDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface CartService {
    public int insertToCart(@Param("userid")int userid,@Param("goodsid")int goodsid,
                            @Param("price")double price,@Param("nums")int nums);

    public List<CartDto> selectAllGoods(@Param("userid")int userid);

    public Cart selectGoods(@Param("userid")int userid, @Param("goodsid")int goodsid);

    public int updateGoods(@Param("id")int id,@Param("nums")int nums);

    public int delGoods(int id);

    public List<CartDto> queryIds(int[] ids);
}
